<%--
  Created by IntelliJ IDEA.
  User: luo20
  Date: 2025/4/18
  Time: 19:47
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" pageEncoding="UTF-8" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>SSM项目首页</title>
    <meta charset="UTF-8">
    <script src="${pageContext.request.contextPath}/js/jquery-3.7.1.min.js"></script>
    <style>
        body {
            font-family: 'Microsoft YaHei', Arial, sans-serif;
            margin: 0;
            padding: 20px;
            background-color: #f5f5f5;
        }
        .container {
            max-width: 800px;
            margin: 0 auto;
            background-color: white;
            padding: 30px;
            border-radius: 10px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
        h1 {
            color: #333;
            text-align: center;
            margin-bottom: 30px;
        }
        .info {
            background-color: #e7f3ff;
            padding: 15px;
            border-left: 4px solid #2196F3;
            margin: 20px 0;
            border-radius: 5px;
        }
        .test-link {
            display: inline-block;
            background-color: #4CAF50;
            color: white;
            padding: 12px 24px;
            text-decoration: none;
            border-radius: 5px;
            margin: 10px 5px;
            font-size: 16px;
            transition: background-color 0.3s;
        }
        .test-link:hover {
            background-color: #45a049;
            text-decoration: none;
            color: white;
        }
        .test-link.primary {
            background-color: #2196F3;
        }
        .test-link.primary:hover {
            background-color: #1976D2;
        }
        .feature-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            margin: 20px 0;
        }
        .feature-card {
            background-color: #f8f9fa;
            padding: 20px;
            border-radius: 8px;
            border: 1px solid #e9ecef;
        }
        .feature-card h4 {
            color: #2196F3;
            margin-top: 0;
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>SSM框架项目首页</h1>
        
        <div class="info">
            <h3>项目信息</h3>
            <p><strong>框架：</strong>Spring + SpringMVC + MyBatis</p>
            <p><strong>服务器：</strong>Tomcat 10.1.20</p>
            <p><strong>数据库：</strong>MySQL</p>
            <p><strong>构建工具：</strong>Maven</p>
            <p><strong>连接池：</strong>HikariCP</p>
        </div>
        
        <h3>功能测试</h3>
        <div style="text-align: center; margin: 30px 0;">
            <a href="${pageContext.request.contextPath}/user/test" class="test-link">测试Controller</a>
            <a href="${pageContext.request.contextPath}/user/list" class="test-link primary">用户管理系统</a>
        </div>
        
        <div class="feature-grid">
            <div class="feature-card">
                <h4>Spring框架</h4>
                <p>✅ 依赖注入 (DI)</p>
                <p>✅ 面向切面编程 (AOP)</p>
                <p>✅ 事务管理</p>
            </div>
            
            <div class="feature-card">
                <h4>SpringMVC</h4>
                <p>✅ 控制器映射</p>
                <p>✅ 视图解析器</p>
                <p>✅ JSON数据处理</p>
            </div>
            
            <div class="feature-card">
                <h4>MyBatis</h4>
                <p>✅ SQL映射</p>
                <p>✅ 结果集映射</p>
                <p>✅ 动态SQL</p>
            </div>
            
            <div class="feature-card">
                <h4>数据库连接</h4>
                <p>✅ HikariCP连接池</p>
                <p>✅ 数据库事务</p>
                <p>✅ 连接管理</p>
            </div>
        </div>
        
        <div class="info">
            <h3>测试说明</h3>
            <p>1. <strong>测试Controller：</strong>验证SpringMVC控制器是否正常工作</p>
            <p>2. <strong>用户管理系统：</strong>完整测试SSM三层架构，包括：</p>
            <ul>
                <li>数据库连接和查询</li>
                <li>MyBatis映射配置</li>
                <li>Service业务逻辑</li>
                <li>Controller请求处理</li>
                <li>JSP页面渲染</li>
                <li>Ajax异步请求</li>
            </ul>
        </div>
        
        <div class="info">
            <h3>项目状态</h3>
            <p>✅ 项目配置完成</p>
            <p>✅ 数据库连接正常</p>
            <p>✅ 三层架构搭建完成</p>
            <p>✅ 可以正常启动和测试</p>
        </div>
    </div>
    
    <script>
        // 页面加载完成后的初始化
        $(document).ready(function() {
            console.log('SSM项目首页加载完成');
            
            // 添加点击效果
            $('.test-link').click(function() {
                $(this).css('transform', 'scale(0.95)');
                setTimeout(() => {
                    $(this).css('transform', 'scale(1)');
                }, 100);
            });
        });
    </script>
</body>
</html>
